package com.obas.access.business.service.impl;

import java.util.List;

import com.ease.platform.access.service.impl.AbstractNamespaceAccessServiceImpl;
import com.obas.access.business.service.BusinessFunctionAccessService;
import com.obas.model.business.BusinessFunction;
import com.obas.model.business.criteria.BusinessFunctionCriteria;

public class BusinessFunctionAccessServiceImpl extends AbstractNamespaceAccessServiceImpl<BusinessFunction> implements BusinessFunctionAccessService {

	public List<BusinessFunction> findByBusinessUsecaseId(long businessUsecaseId) {
		BusinessFunctionCriteria parameter = new BusinessFunctionCriteria();
		parameter.setBusinessUsecaseId(businessUsecaseId);
		return this.find(parameter);
	}

	@Override
	public BusinessFunction createEntity(BusinessFunction businessFunction, long businessUsecaseId) {
		businessFunction.setBusinessUsecaseId(businessUsecaseId);
		businessFunction = this.save(businessFunction);
		return businessFunction;
	}

}
